Programming With QuickTime VR 2.1

Previous | Overview | Contents | Next

Determining That the QuickTime VR Manager Is Available

Before calling any QuickTime VR Manager routines, you need to verify that the QuickTime VR Manager is available in the current operating environment and that it has the capabilities you need. On the Mac OS, you can verify that the QuickTime VR Manager is available by calling the Gestalt function with the gestaltQTVRMgrAttr selector. Gestalt returns, in its second parameter, a long word whose value encodes the attributes of the QuickTime VR Manager. Listing 1 illustrates how to determine whether the QuickTime VR Manager is available.

Listing 1 Checking for the availability of the QuickTime VR Manager

Boolean MyHasQTVRManager (void)
{
    OSErr           myErr;
    long            myAttrs;
    Boolean         myHasQTVRMgr = false;
    
    myErr = Gestalt(gestaltQTVRMgrAttr, &myAttrs);
    if (myErr == noErr)
        if (myAttrs & (1 << gestaltQTVRMgrPresent))
            myHasQTVRMgr = true;

    return myHasQTVRMgr;
}

You can also use the Gestalt function to get information about other attributes of the QuickTime VR Manager. See "Gestalt Selector and Response Values" for details on the QuickTime VR Manager attributes you can query.

The Gestalt function is present only in the Macintosh operating system, not on Windows. For more information on the Gestalt function, see Inside Macintosh: Operating System Utilities .


© 1997 Apple Computer, Inc.

Previous | Overview | Contents | Next